import {
  createSSRApp
} from "vue";
import App from "./App.vue";
import store from "./store/store";
import Serv from "./services/index";
import mixin from "./mixin/mixin";
import Api from './services/api';
import Upload from "./services/upload";

const { request } = Serv;
const { upload } = Upload;

export function createApp() {
  const app = createSSRApp(App);
  app.config.globalProperties.$request = request;
  app.config.globalProperties.$Serv = Serv;
  app.config.globalProperties.$upload = upload;
  app.use(store)
    .use(Api)
  app.mixin(mixin)
  return {
    app,
  };
}
